<SCRIPT src="/js/edit_release.js" type="text/javascript"></SCRIPT>
<FORM method="post" enctype="multipart/form-data" onsubmit="return checkForm();" action="/?cat=commit_release&update=1">

    <input type="hidden" value="<!--TPL:$release->id-->" name="release_id">
    <TABLE class="commit_table" width="50%" align="center" cellspacing="5" cellpadding="0">
	<TR>
	    <TD width="100%" class="commit_caption">
		<TABLE border="0">
		    <TR>
			<TD  nowrap align="left" width="100%">
			    <!--TPL:"Edit release"|gettext-->
			</TD>
		    </TR>
		</TABLE>
	    </TD>
	</TR>
	<TR>
	    <TD width="100%" class="commit_desc" align="center">
		<!--TPL:"Please don't abuse."|gettext-->
	    </TD>
	</TR>
	<TR>
	    <TD width="100%">
                <TABLE width="85%" border="0" align="center" cellspacing="0" cellpadding="5">
                    
                    <TR>
                        <TD class="commit_label" nowrap align="right" width="35%">
                                <!--TPL:"Artist name"|gettext-->:
                        </TD>
                        <TD nowrap align="left" height="32" width="65%">
                            <input type="hidden" name="artistname" id="artistname" value="<!--TPL:$release->artist_name-->">
                            <!--TPL:$release->artist_name-->
                        </TD>
                    </TR>


                    <TR>
                        <TD class="commit_label" nowrap align="right" width="35%">
                                <!--TPL:"Release name"|gettext-->:
                        </TD>
                        <TD nowrap align="left" height="32" width="65%">
                            <input name="releasename" id="releasename" class="flat" type="text" size="46" maxlength="128" value="<!--TPL:$release->name-->">
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <!--TPL:"Release date"|gettext-->:<BR>
                            <span class="label_desc"><!--TPL:"yyyy-mm-dd"|gettext--></span>
                        </TD>
                        <TD nowrap align="left">
                            <input name="releasedate" id="releasedate" class="flat" type="text" size="10" maxlength="10" value="<!--TPL:if $release->release_date--><!--TPL:$release->release_date--><!--TPL:else--><!--TPL:$release->schedule_date--><!--TPL:/if-->">
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <!--TPL:"Recording label"|gettext-->:<BR>
                            <span class="label_desc"><!--TPL:"e.g Rise Records"|gettext--></span>
                        </TD>
                        <TD nowrap align="left">
                            <input type="text" name="labelname" id="labelname" class="flat" size="30" maxlength="128" value="<!--TPL:$release->label_name-->">
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <!--TPL:"Record type"|gettext-->:
                        </TD>
                        <TD nowrap align="left">
                            <select name="recordtype" id="recordtype" class="flat">
                                <!--TPL:foreach name=outer from=$record_types item=item-->
                                <option value="<!--TPL:$item.id-->" <!--TPL:if $item.name == $release->record_type-->selected<!--TPL:/if-->><!--TPL:$item.name--></option>
                                <!--TPL:/foreach-->
                            </select>
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <small><!--TPL:"Length"|gettext-->:</small><BR>
                            <span class="label_desc"><!--TPL:"mm:ss"|gettext--></span>
                        </TD>
                        <TD nowrap align="left">
                            <input name="length" id="length" class="flat" type="text" size="10" maxlength="7" value="<!--TPL:$release->length|get_album_length-->">
                        </TD>
                    </TR>

                    <TR>
                        <TD class="commit_label" nowrap align="right">
                            <small><!--TPL:"Track count"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                            <input name="trackcount" id="trackcount" class="flat" type="text" size="10" maxlength="4" value="<!--TPL:$release->track_count-->">
                        </TD>
                    </TR>
                    <TR>
                        <TD class="commit_label" nowrap align="right">
                                <small><!--TPL:"Picture"|gettext-->:</small>
                        </TD>
                        <TD nowrap align="left">
                            <!--TPL:if $release->has_picture == 't' -->
                            <input type="hidden" name="has_picture" value="1">
                            <!--TPL:/if-->
                                <input type="file" id="picture" name="picture" size="38">
                              <br>
                                <input class="flat" type="text" id="picture_url" name="picture_url" size="38">
                        </TD>
                    </TR>

                    <TR>
                        <TD colspan="2" align="left">
                            <div align="center">
                                <input type="submit" value="<!--TPL:"Commit changes"|gettext-->">
                            </div>
                        </TD>
                    </TR>

                </TABLE>
            </TD>
          </TR>
    </TABLE>
</FORM>